package com.course.testng.groups;

import org.testng.annotations.AfterGroups;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.Test;

public class GroupsOnMethodTest {

    @Test(groups = "A")
    public void test1() {
        System.out.println("我是组A中的test1方法");
    }

    @Test(groups = "A")
    public void test2() {
        System.out.println("我是组A中的test2方法");
    }

    @Test(groups = "B")
    public void test3() {
        System.out.println("我是组B中的test3方法");
    }

    @BeforeGroups("A")
    public void beforeAGroups() {
        System.out.println("在组A之前执行");
    }

    @AfterGroups("A")
    public void afterAGroups() {
        System.out.println("在组A之后执行");
    }
 }
